package main

import (
	"fmt"
	"log"
	"net"
	"net/http"
	"net/rpc"
)

type Server struct {
}

type Request struct {
}

type Response struct {
}

func (s *Server) HelloRpc(req Request, ret *Response) error {
	fmt.Println("hello rpc")
	return nil
}

func main() {
	server := new(Server)
	rpc.Register(server)
	rpc.HandleHTTP()
	l, e := net.Listen("tcp", ":1234")
	if e != nil {
		log.Fatal("listen error:", e)
	}
	http.Serve(l, nil)
}
